import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: 'home',
  },
  {
    path: '/home',
    name: 'home',
    component: () => import(/* webpackChunkName: "home" */`@/views/Home/Home.vue`),
    meta: {
      title: '首页',
      /*swiperType: 'home_index', 暂时没啥用*/
    },
  },
  {
    path: '/materials',
    name: 'materials',
    component: () => import(/* webpackChunkName: "materials" */`@/views/Materials/Materials.vue`),
    meta: {
      title: '教辅资料',
    },
  },
  {
    path: '/test',
    name: 'test',
    component: () => import(/* webpackChunkName: "test" */`@/views/Test/Test.vue`),
    meta: {
      title: '教材测试',
    },
  },
  {
    path: '/news',
    name: 'news',
    component: () => import(/* webpackChunkName: "news" */`@/views/News/News.vue`),
    meta: {
      title: '新闻中心',
    },
  },
  {
    path: '/ally',
    name: 'ally',
    component: () => import(/* webpackChunkName: "ally" */`@/views/Ally/Ally.vue`),
    meta: {
      title: '招商加盟',
    },
  },
  {
    path: '/netsite',
    name: 'netsite',
    component: () => import(/* webpackChunkName: "netsite" */`@/views/Netsite/Netsite.vue`),
    meta: {
      title: '关于我们',
    },
  },
  {
    path: '/aboutus',
    name: 'aboutus',
    component: () => import(/* webpackChunkName: "aboutus" */`@/views/AboutUs/AboutUs.vue`),
    meta: {
      title: '关于我们',
    },
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
